name: js-install
description: Set up Node.js and pnpm, install dependencies

runs:
  using: composite
  steps:
    - uses: pnpm/action-setup@v2.1.0
      with:
        version: "9.0.6"

    - name: Install Node.js
      uses: actions/setup-node@v3
      with:
        node-version-file: "src/interfaces/coral_web/.nvmrc"
        cache: "pnpm"
        cache-dependency-path: "src/interfaces/coral_web/pnpm-lock.yaml"

    - name: Install dependencies with pnpm
      shell: bash
      working-directory: src/interfaces/coral_web
      run: pnpm install --frozen-lockfile
